import Taro, { Component } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'
import styles from './index.module.less'

class TabBarItem extends Component {

    render() {
        const { icon, title = '未命名', value = 0 } = this.props
        console.log(value);
        
        return (
            <View className={styles.flexBoxItem}>
                {icon ? <Image className={styles.flexBoxItemIcon} src={icon} /> : <View className={styles.flexBoxItemValue}>{value}</View>}
                <View className={styles.flexBoxItemTitle}>{title}</View>
            </View>
        )
    }
}


// eslint-disable-next-line import/prefer-default-export
export { TabBarItem }